﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="CoverNoteList.aspx.cs" Inherits="carinsurance_offline_CoverNoteList" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
    <title>
        Cover Note
        - GG-CRM - กล้วยๆ.com - Teledirect Thailand</title>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <h1>
        <asp:Label runat="server" Text="Cover Note" ID="lblPageName"></asp:Label></h1>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" />
        
    <asp:UpdatePanel ID="uplSearch" runat="server">
        <ContentTemplate>
            <div id="divSearch">
                <div class="topdisplay pb10">
                    <table width="100%" border="1" cellpadding="10" cellspacing="10" class="flattable">
                        <tr>
                            <td>
                                <asp:Label ID="lblSearchRef" runat="server" Text="<%$Resources:General,ReferenceNo%>"></asp:Label>
                                        &nbsp;<asp:TextBox runat="server" ID="txtSearchReferenceNo" Width="150px"></asp:TextBox>
                                        &nbsp; &nbsp;
                                        <asp:Label ID="lblLicense" runat="server" Text="<%$Resources:CarInsuranceResultPage,LicensePlate%>"></asp:Label>
                                        &nbsp;<asp:TextBox runat="server" ID="txtSearchLicensePlate" Width="150px"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnSubmit" runat="server" Text="<%$Resources:General,Search%>" OnClick="btnSubmit_Click"
                                    CssClass="blueB ml10" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <asp:Label runat="server" ID="lblRecordCount" CssClass="red" />
                </div>
                <div class="toggle">
                    <div class="title opened" id="opened1">
                        <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label runat="server" ID="Label5" Text="<%$Resources:General,ApplicationList%>" />
                        </h6>
                    </div>
                    <asp:GridView ID="grvApplication" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                        CssClass="sTable" GridLines="None" Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>"
                        OnSelectedIndexChanged="grvApplication_SelectedIndexChanged" DataKeyNames="CECarId, RefCEUserID, CarPlate, QuoteRefNo, Email">
                        <Columns>
                            <asp:BoundField DataField="AppTypeDesc" HeaderText="App Type" SortExpression="AppTypeDesc"
                                ItemStyle-Width="120px" ItemStyle-Font-Bold="true" />
                            <asp:BoundField DataField="QuoteRefNo" HeaderText="<%$Resources:CarInsurance,ReferenceNo%>"
                                SortExpression="QuoteRefNo" ItemStyle-Width="70px" />
                            <asp:BoundField DataField="Name" HeaderText="<%$Resources:CarInsurance,Name%>" SortExpression="Name"
                                ItemStyle-Width="120px" />
                            <asp:BoundField DataField="CarPlate" HeaderText="<%$Resources:Proposal,PlateNumber%>"
                                SortExpression="CarPlate" ItemStyle-Width="100px" />
                            <asp:BoundField DataField="PaymentStatus" HeaderText="<%$Resources:General,PaymentStatus%>"
                                SortExpression="PaymentStatus" ItemStyle-Width="80px" ItemStyle-Font-Bold="true"
                                ItemStyle-ForeColor="red" />
                            <asp:BoundField DataField="SendToProviderStatus" HeaderText="<%$Resources:CarInsurance,SendToProvider%>"
                                SortExpression="SendToProviderStatus" ItemStyle-Width="50px" />
                            <asp:BoundField DataField="CompletedStatsus" HeaderText="<%$Resources:CarInsurance,Completed%>"
                                SortExpression="CompletedStatsus" ItemStyle-Width="60px" />
                            <asp:BoundField DataField="ModifiedDate" HeaderText="<%$Resources:General,DateTime%>"
                                SortExpression="ModifiedDate" ItemStyle-Width="50px" DataFormatString="{0:dd/MM/yyyy hh:mm tt}" />
                            <asp:BoundField DataField="FirstName" HeaderText="Agent" SortExpression="FirstName" ItemStyle-Width="60px" /> 
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <div>
                                        <asp:Label ID="lblSurName" runat="server" Text='<%# Eval("SurName") %>' />
                                        <asp:Label ID="lblOfficeNumber" runat="server" Text='<%# Eval("OfficeNumber") %>' />
                                        <asp:Label ID="lblCar" runat="server" Text='<%# Eval("CarModel") %>' />
                                        <asp:Label ID="lblMed" runat="server" Text='<%# Eval("MedicalExpense") %>' />
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField Visible="true" HeaderText="<%$Resources:CarInsurance,Select%>"
                                SelectText="<%$Resources:CarInsurance,Select%>" ShowSelectButton="true" ItemStyle-Width="50px" />
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle BackColor="ActiveBorder" />
                        <HeaderStyle />
                        <EditRowStyle />
                        <AlternatingRowStyle />
                        <RowStyle />
                    </asp:GridView>
                    <div style="display: none">
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId"></asp:TextBox>
                        <asp:Label runat="server" ID="lblAgentEmail"></asp:Label>
                        <asp:Label runat="server" ID="lblAgentName"></asp:Label>
                        <asp:Label runat="server" ID="lblAgentPhone"></asp:Label>
                        <asp:Label runat="server" ID="lblCarPlate"></asp:Label>
                        <asp:Label runat="server" ID="lblCustomerName"></asp:Label>
                        <asp:Label runat="server" ID="lblCarID"></asp:Label>
                        <asp:Label runat="server" ID="lblCustomerID"></asp:Label>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <br />
                <div id="divSendEmail" runat="server">
                <table cellpadding="0" cellspacing="0" width="100%" border="0">
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lblCarModel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 40px;">
                            <asp:Label runat="server" ID="lblEmail" Text="Email" Width="60px"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtOnlineConfirmEmail" runat="server" Width="200px" />
                            <asp:RequiredFieldValidator ID="rfvOnlineConfirmEmail" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtOnlineConfirmEmail"
                                ErrorMessage="*" Text="*" />
                            <asp:RegularExpressionValidator ID="revOnlineConfirmEmail" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtOnlineConfirmEmail"
                                ErrorMessage="*" Text="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />&nbsp;&nbsp;
                            <asp:Label runat="server" ID="lblCoverNoteNo" Text="Cover Note No."></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtCoverNoteNo" runat="server" Width="200px" />
                            <asp:RequiredFieldValidator ID="rfvCoverNoteNo" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtCoverNoteNo"
                                ErrorMessage="*" Text="*" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="Label1" Text="ที่นั่ง (Seat)"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtSeat" runat="server" Width="100px" />
                            <asp:RequiredFieldValidator ID="rfvSeat" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtSeat"
                                ErrorMessage="*" Text="*" />&nbsp;&nbsp;<asp:Label runat="server" ID="Label2" Text="<%$Resources:Proposal,Size%>"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtcc" runat="server" Width="100px" />
                            <asp:RequiredFieldValidator ID="rfvcc" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtcc"
                                ErrorMessage="*" Text="*" />&nbsp;&nbsp;<asp:Label runat="server" ID="Label3" Text="<%$Resources:Proposal,TypeofVehicle%>"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtTypeofVehicle" runat="server" Width="100px" />
                            <asp:RequiredFieldValidator ID="rfvTypeofVehicle" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtTypeofVehicle"
                                ErrorMessage="*" Text="*" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label runat="server" ID="Label4" Text="Vehicle Code"></asp:Label>&nbsp;&nbsp;
                            <asp:TextBox ID="txtVehicleCode" runat="server" Width="100px" />
                            <asp:RequiredFieldValidator ID="rfvVehicleCode" Enabled="true" Display="Dynamic"
                                ValidationGroup="sendonlinequotation" runat="server" ControlToValidate="txtVehicleCode"
                                ErrorMessage="*" Text="*" />&nbsp;&nbsp;<asp:CheckBox
                                        runat="server" ID="chkExcelEng" Text="&nbsp;English" Font-Bold="true" ForeColor="Red" />
                            <asp:Button ID="btnSendCoverNote" runat="server" Text="Send Email" ValidationGroup="sendonlinequotation"
                                Visible="true" OnClick="btnSendCoverNote_Click" CssClass="blueB ml10" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:UpdateProgress AssociatedUpdatePanelID="uplSearch" DisplayAfter="100"
                                runat="server" ID="UpdateProgress2">
                                <ProgressTemplate>
                                    &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../images/loaders/loader2.gif" style="text-align: center"
                                        alt="Loading..." />
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                            <asp:Label runat="server" Font-Bold="true" ForeColor="Red" ID="lblSendCoverNoteMessage" /><asp:Label runat="server" Font-Bold="true" ForeColor="Green" ID="lblNoError" />
                        </td>
                    </tr>
                </table></div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
